<include file="Public:header_user"/>
<div class="user_detail">
	<div class="clearfix user_info">
		<a href="{:URL('upload_head')}"><img class="head" src="{:img($user_head_url, 200, 200)}" alt="" /></a>
		<div class="info">
			<h4 class="nick">{$user_name}</h4>
			<ul class="clearfix">
				<li class="city">{$user_city_name}</li>
				<li class="tel">{$user_mobile}</li>
				<li class="mail">{$user_email}</li>
			</ul>
			<a class="link_edit" href="{:URL('basic_info')}">个人资料编辑</a>
		</div>
	</div>
	<div class="clearfix user_account">
		<ul>
			<li class="first">
				<label>进行中订单</label>
				<span class="red">{$doing_num|default=0}</span>
			</li>
			<li>
				<label>已完成订单</label>
				<span class="blue">{$finish_num|default=0}</span>
			</li>
			<li>
				<label>收入</label>
				<span class="green">6000</span>
			</li>
			<li class="last">
				<label>评分</label>
				<span class="black">8</span>
			</li>
		</ul>
	</div>
</div>
<ul class="clearfix member_top_nav">
	<li class="title on" data-class="unfinish-data">未完成订单</li>
	<li data-class="finish-data">已完成订单</li>
</ul>
<script type="text/javascript">
$(document).ready(function(){
	$('.member_top_nav li').click(function () {
		var data_class = $(this).attr('data-class');
		$('.member_top_nav li').removeClass('on');
		$('.member_table').hide();

		$(this).addClass('on');
		$('.' + data_class).show();
	});
});
</script>
<table class="member_table unfinish-data">
	<thead>
		<tr>
			<th>订单编号</th>
			<th>合同名称</th>
			<th>订单金额</th>
			<th>下单时间</th>
			<th>订单状态</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		<volist name="unfinish_list" id="rs">
		<tr>
			<td>{$rs['order_sn']}</td>
			<td>{$rs['title']}</td>
			<td class="money"><span>{$rs['order_amount']}</span></td>
			<td>{$rs['datetime']}</td>
			<td class="type">
				<span style="color: {$rs['status_color']}">{$rs['user_status_desc']}</span>
				<a href="{:URL('UserOrder/detail', array('order_sn' => $rs['order_sn']))}">订单详情</a>
			</td>
			<td class="operate">
				<eq name="rs.is_pay" value="1">
					<a class="btn_red" href="{:URL('Order/pay', array('order_sn' => $rs['order_sn']))}" target="_blank">支付</a>
				</eq>

				<eq name="rs.is_cancel" value="1">
					<!-- <a class="link" href="{:URL('UserOrder/cancel', array('order_sn' => $rs['order_sn']))}">取消订单</a> -->
				</eq>

				<eq name="rs.is_comment" value="1">
					<a class="win link" href="{:URL('UserOrder/win_comment', array('order_sn' => $rs['order_sn']))}">评价</a>
				</eq>

				<eq name="rs.is_view_comment" value="1">
					<a class="link" href="{:URL('UserOrder/view_comment', array('order_sn' => $rs['order_sn']))}">查看评价</a>
				</eq>
				<eq name="rs.status" value="finish">
					<a class="btn_red" href="{$rs['finish_file_url']}">下载合同</a>
				</eq>
			</td>
		</tr>
		</volist>
		<empty name="unfinish_list">
		<tr>
			<td class="no_result" colspan="7">
				抱歉，没有找到对应的订单数据。
			</td>
		</tr>
		</empty>
	</tbody>
</table>

<table class="member_table finish-data hide">
	<thead>
		<tr>
			<th>订单编号</th>
			<th>合同名称</th>
			<th>订单金额</th>
			<th>下单时间</th>
			<th>订单状态</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		<volist name="finish_list" id="rs">
		<tr>
			<td>{$rs['order_sn']}</td>
			<td>{$rs['title']}</td>
			<td class="money"><span>{$rs['order_amount']}</span></td>
			<td>{$rs['datetime']}</td>
			<td class="type">
				<span style="color: {$rs['status_color']}">{$rs['user_status_desc']}</span>
				<a href="{:URL('UserOrder/detail', array('order_sn' => $rs['order_sn']))}">订单详情</a>
			</td>
			<td class="operate">
				<eq name="rs.is_pay" value="1">
					<a class="btn_red" href="{:URL('Order/pay', array('order_sn' => $rs['order_sn']))}" target="_blank">支付</a>
				</eq>

				<eq name="rs.is_cancel" value="1">
					<!-- <a class="link" href="{:URL('UserOrder/cancel', array('order_sn' => $rs['order_sn']))}">取消订单</a> -->
				</eq>

				<eq name="rs.is_comment" value="1">
					<a class="win link" href="{:URL('UserOrder/win_comment', array('order_sn' => $rs['order_sn']))}">评价</a>
				</eq>

				<eq name="rs.is_view_comment" value="1">
					<a class="link" href="{:URL('UserOrder/view_comment', array('order_sn' => $rs['order_sn']))}">查看评价</a>
				</eq>
				<eq name="rs.status" value="finish">
					<a class="btn_red" href="{$rs['finish_file_url']}">下载合同</a>
				</eq>
			</td>
		</tr>
		</volist>
		<empty name="finish_list">
		<tr>
			<td class="no_result" colspan="7">
				抱歉，没有找到对应的订单数据。
			</td>
		</tr>
		</empty>
	</tbody>
</table>
<include file="Public:footer_user"/>